﻿@model DevWeb.Biztalk.DeploymentSettings.WebUI.Models.ParametersValuesModel

@{
    ViewBag.Title = "ParametersValues";
}

<h2>Create Or Edit Parameter Values</h2>

@using (Html.BeginForm("ParametersValues", "IntegrationVersionSetting", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Parameter Values</legend>

        @Html.HiddenFor(model => model.Id)
        <p>
            <div class="editor-label">
                @Html.LabelFor(model => model.ParameterName)
            </div>
            <div class="editor-field">
                @Html.DisplayTextFor(model => model.ParameterName)

            </div>
        </p>
        
        <div class="form-group">
            @Html.LabelFor(model=> model.DefaultValue, new { @class = "col-md-1 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(model => model.DefaultValue, new { @class = "form-control" })
            </div>
        </div>





         
       
        <em>Environment Values:</em>
        @if (Model != null)
        {
            foreach (var item in Model.ParameterValues)
            {

                <div class="form-group">
                   @Html.Label(item.Environment + " Value:", new { @class = "col-md-1 control-label" })
                    <div class="col-md-10">
                       @Html.TextBox(item.Environment.ToString(), item.Value,  new { @class = "form-control" }) 
                    </div>
                </div>

                    
                    
                

            }
        }
        
        <p>
            <input type="submit" value="Save" class="btn btn-default" /><br /><br />
            @Html.ActionLink("Return to Parameter List", "Index", "IntegrationVersionSetting", new { id = ViewBag.IntegrationVersionId }, new { @class="btn btn-info"})

        <p>
           
       
    </fieldset>
}


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
